package love.simbot.example.listen.listenServer;

import love.forte.common.ioc.annotation.Beans;
import love.forte.simbot.annotation.OnFriendAddRequest;
import love.forte.simbot.api.message.events.FriendAddRequest;
import love.forte.simbot.api.message.events.MessageGet;
import love.forte.simbot.api.sender.Getter;
import love.forte.simbot.api.sender.Sender;
import love.forte.simbot.api.sender.Setter;

@Beans
public class FriendListener {


    @OnFriendAddRequest
    public void addFriendListener(FriendAddRequest request,
                                  Setter setter){

        String message = request.getText();
        if(message.equals("やっと見つけた織姫様") || message.equals("终于找到了织女星")){
            setter.setFriendAddRequest(request.getFlag(),null,true,false);
            return;
        }

        setter.setFriendAddRequest(request.getFlag(),null,false,false);
    }


}
